/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { TreeDataModel, TreeModel } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmProjFilesCls extends TreeModel<PmProjFilesCls> {
  ID?: string; // 文件夹编码
  name?: string; // 文件夹名称
}

export const pmProjFilesClsList = (params?: PmProjFilesCls | any) =>
  defHttp.get<PmProjFilesCls>({ url: adminPath + '/proj/folder/pmProjFilesCls/list', params });

export const pmProjFilesClsListData = (params?: PmProjFilesCls | any) =>
  defHttp.post<PmProjFilesCls[]>({ url: adminPath + '/proj/folder/pmProjFilesCls/listData', params });

export const pmProjFilesClsForm = (params?: PmProjFilesCls | any) =>
  defHttp.get<PmProjFilesCls>({ url: adminPath + '/proj/folder/pmProjFilesCls/form', params });

export const pmProjFilesClsCreateNextNode = (params?: PmProjFilesCls | any) =>
  defHttp.get<PmProjFilesCls>({ url: adminPath + '/proj/folder/pmProjFilesCls/createNextNode', params });

export const pmProjFilesClsSave = (params?: any, data?: PmProjFilesCls | any) =>
  defHttp.postJson<PmProjFilesCls>({ url: adminPath + '/proj/folder/pmProjFilesCls/save', params, data });

export const pmProjFilesClsDisable = (params?: PmProjFilesCls | any) =>
  defHttp.get<PmProjFilesCls>({ url: adminPath + '/proj/folder/pmProjFilesCls/disable', params });

export const pmProjFilesClsEnable = (params?: PmProjFilesCls | any) =>
  defHttp.get<PmProjFilesCls>({ url: adminPath + '/proj/folder/pmProjFilesCls/enable', params });

export const pmProjFilesClsDelete = (params?: PmProjFilesCls | any) =>
  defHttp.get<PmProjFilesCls>({ url: adminPath + '/proj/folder/pmProjFilesCls/delete', params });

export const pmProjFilesClsTreeData = (params?: any) =>
  defHttp.get<TreeDataModel[]>({ url: adminPath + '/proj/folder/pmProjFilesCls/treeData', params });
